<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>

    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/css/base.css"/>
    <link href="${pageContext.request.contextPath}/static/css/daoke.css" rel="stylesheet" type="text/css"/>

    <link href="${pageContext.request.contextPath}/static/css/iconfont.css" rel="stylesheet" type="text/css"/>
    <script language="javascript">
        function del(id) {
            if (confirm('您确定删除吗？')) {
                window.location.href = "${pageContext.request.contextPath}/admin/delExpert.html?id=" + id;
            }
        }

        function add() {
            var url = "${pageContext.request.contextPath}/admin/expert/addExpert.jsp";
            window.location.href = url;
        }

    </script>
</head>

<body leftmargin="2" topmargin="2">
<table width="98%" border="0" cellpadding="0" cellspacing="0" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
    <tr bgcolor="#E7E7E7">
        <td height="14" colspan="110" >&nbsp;&nbsp;
            <i class="iconfont icon-xiugai font16"></i>医生信息管理
        </td>
    </tr>
    <tr align="center" bgcolor="#FAFAF1" height="30">
        <td width="4%">序号</td>
        <td width="15%">医院</td>
        <td width="8%">科室</td>
        <td width="8%">姓名</td>

        <td width="8%">性别</td>
        <td width="8%">年龄</td>
        <td width="20%">擅长</td>
        <td width="10%">类型</td>

        <td width="10%">照片</td>
        <td width="6%">操作</td>
    </tr>
    <c:forEach items="${expertAllList}" var="expert" varStatus="status">
        <tr align='center' bgcolor="#FFFFFF" onMouseMove="javascript:this.bgColor='red';"
            onMouseOut="javascript:this.bgColor='#FFFFFF';" height="35">
            <td bgcolor="#FFFFFF" align="center">
                    ${status.index+1}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${expert.hospital.name}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${expert.department.name}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${expert.name}
            </td>

            <td bgcolor="#FFFFFF" align="center">
                    ${expert.sex}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${expert.age}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${expert.skilled}
            </td>
            <td bgcolor="#FFFFFF" align="center">
                    ${expert.type}
            </td>

            <td bgcolor="#FFFFFF" align="center">
                <img src="../../${expert.file}" width="100px" height="100px"/>

            </td>
            <td bgcolor="#FFFFFF" align="center">
                <input type="button" value="删除" onclick="del(${expert.id})" style="width: 60px;height: 25px;box-sizing: border-box; border-radius: 5px;"/>
            </td>
        </tr>
    </c:forEach>
</table>

<table width='98%' border='0' style="margin-top:8px;margin-left: 8px;">
    <tr>
        <td>
            <input type="button" value="添加医生信息" style="width: 120px;height: 30px;box-sizing: border-box; border-radius: 5px;font-size: 16px;"  onclick="add()"/>
        </td>
    </tr>
</table>

<div id="tip" style="position:absolute;display:none;border:0px;width:120px; height:150px;">
    <TABLE id="tipTable" border="0" bgcolor="#ffffee">
        <TR align="center">
            <TD><img id="photo" src="" height="80" width="80"></TD>
        </TR>
    </TABLE>
</div>
</body>
</html>
